home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 June / MacHome Magazine Demo Disc June 2001.iso / Stuff / Software / Tools / Substitute Pro 1.8.5 / Yellow Extension Toolkit / YEHeader.h < prev   
Encoding:
Text File  |  2000-02-01  |  1.5 KB  |  55 lines  |  [TEXT/CWIE]

  1. //•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. //    YELLOW EXTENSION TOOLKIT
  3. //    File Name:    YEHeader.h
  4. //    © 1998-2000 by Rocco Moliterno-Yellowsoft. All Right Reserved
  5. //•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  6. //You need this file plus "YE proto.h" in order to call extensions from within your own applications
  7. #pragma once
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. #if PRAGMA_ALIGN_SUPPORTED
  14. #pragma options align=mac68k
  15. #endif
  16.  
  17. typedef void (*YellowProc)(YEBlockPtr inData);
  18.  
  19. #if GENERATINGCFM
  20.     typedef UniversalProcPtr YellowEntryProcUPP;
  21. #else
  22.     typedef YellowProc YellowEntryProcUPP;
  23. #endif
  24.  
  25. //
  26. //
  27.  
  28. #if GENERATINGCFM
  29.     #define NewYellowEntryProcUPP(userRoutine)    \
  30.             (YellowEntryProcUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppYellowEntryProcInfo, GetCurrentISA())
  31.     #define NewYellowEntryProc68k(userRoutine)    \
  32.             (YellowEntryProcUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppYellowEntryProcInfo, (ISAType) kM68kISA)
  33. #else
  34.     #define NewYellowEntryProcUPP(userRoutine)    \
  35.             (YellowEntryProcUPP)(userRoutine)
  36.     #define NewYellowEntryProc68k(userRoutine)    \
  37.             (YellowEntryProcUPP)(userRoutine)
  38. #endif
  39.  
  40. #if GENERATINGCFM
  41.     #define CallYellowEntryProcUPP(userRoutine, params)    \
  42.             CallUniversalProc((UniversalProcPtr)(userRoutine), uppYellowEntryProcInfo, params)
  43. #else
  44.     #define CallYellowEntryProcUPP(userRoutine, params)    \
  45.             (*(userRoutine))(params)
  46. #endif
  47.  
  48. #if PRAGMA_ALIGN_SUPPORTED
  49. #pragma options align=reset
  50. #endif
  51.  
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55.